package com.hzsk.lisence.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Description :
 * @Date : 2024/8/15
 * @Author : ChenJin
 * @Version : v1.0.0
 **/
@Getter
@AllArgsConstructor
public enum FunctionItemEnum {

    /**
     * 四轴定向加工
     */
    FourAxisDirectionalMachining("FourAxisDirectionalMachining","四轴定向加工"),

    /**
     * 切向跟随功能
     */
    TangentialFollowFunction("TangentialFollowFunction","切向跟随功能"),

    /**
     * 一般RTCP功能
     */
    GeneralRTCPFunction("GeneralRTCPFunction","一般RTCP功能"),

    /**
     *七轴RTCP功能
     */
    SevenAxisRTCPFunction("SevenAxisRTCPFunction","七轴RTCP功能"),

    /**
     *五轴匀化
     */
    FiveAxisHomogenization("FiveAxisHomogenization","五轴匀化"),

    /**
     *前馈功能
     */
    FeedforwardFunction("FeedforwardFunction","前馈功能"),

    /**
     *防碰撞功能
     */
    AntiCollisionFunction("AntiCollisionFunction","防碰撞功能"),

    /**
     *负载自适应功能
     */
    LoadAdaptiveFunction("LoadAdaptiveFunction","负载自适应功能"),

    /**
     *空间圆弧指令
     */
    SpaceArcCommand("SpaceArcCommand","空间圆弧指令");

    private final String code;

    private final String name;

    public static String getNameByCode(String code){
        for (FunctionItemEnum functionItem:FunctionItemEnum.values()){
            if (functionItem.getCode().equals(code)){
                return functionItem.getName();
            }
        }
        return null;
    }



}
